package com.hangjiang.gulidear.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 * Resume entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "resume", catalog = "sqm")
public class Resume extends BaseEntity {

	// Fields

	private String resumeId;
	private String country;
	private String nation;
	private String currentAdd;
	private String birthAdd;
	private Double hight;
	private Double weight;
	private Integer marriage;
	private Date birthDay;
	private String post;
	private String degree;
	private Date workTime;
	private String workExperience;
	private Set<User> users = new HashSet<User>(0);

	// Constructors

	/** default constructor */
	public Resume() {
	}

	/** full constructor */
	public Resume(String country, String nation, String currentAdd,
			String birthAdd, Double hight, Double weight, Integer marriage,
			Date birthDay, String post, String degree, Date workTime,
			String workExperience) {
		this.country = country;
		this.nation = nation;
		this.currentAdd = currentAdd;
		this.birthAdd = birthAdd;
		this.hight = hight;
		this.weight = weight;
		this.marriage = marriage;
		this.birthDay = birthDay;
		this.post = post;
		this.degree = degree;
		this.workTime = workTime;
		this.workExperience = workExperience;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "resumeId", unique = true, nullable = false, length = 32)
	public String getResumeId() {
		return this.resumeId;
	}

	public void setResumeId(String resumeId) {
		this.resumeId = resumeId;
	}

	@Column(name = "country", length = 30)
	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	@Column(name = "nation", length = 30)
	public String getNation() {
		return this.nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	@Column(name = "currentAdd", length = 50)
	public String getCurrentAdd() {
		return this.currentAdd;
	}

	public void setCurrentAdd(String currentAdd) {
		this.currentAdd = currentAdd;
	}

	@Column(name = "birthAdd", length = 50)
	public String getBirthAdd() {
		return this.birthAdd;
	}

	public void setBirthAdd(String birthAdd) {
		this.birthAdd = birthAdd;
	}

	@Column(name = "hight", precision = 22, scale = 0)
	public Double getHight() {
		return this.hight;
	}

	public void setHight(Double hight) {
		this.hight = hight;
	}

	@Column(name = "weight", precision = 22, scale = 0)
	public Double getWeight() {
		return this.weight;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	@Column(name = "marriage")
	public Integer getMarriage() {
		return this.marriage;
	}

	public void setMarriage(Integer marriage) {
		this.marriage = marriage;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "birthDay", length = 0)
	public Date getBirthDay() {
		return this.birthDay;
	}

	public void setBirthDay(Date birthDay) {
		this.birthDay = birthDay;
	}

	@Column(name = "post", length = 30)
	public String getPost() {
		return this.post;
	}

	public void setPost(String post) {
		this.post = post;
	}

	@Column(name = "degree", length = 30)
	public String getDegree() {
		return this.degree;
	}

	public void setDegree(String degree) {
		this.degree = degree;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "workTime", length = 0)
	public Date getWorkTime() {
		return this.workTime;
	}

	public void setWorkTime(Date workTime) {
		this.workTime = workTime;
	}

	@Column(name = "workExperience", length = 65535)
	public String getWorkExperience() {
		return this.workExperience;
	}

	public void setWorkExperience(String workExperience) {
		this.workExperience = workExperience;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "resume")
	public Set<User> getUsers() {
		return this.users;
	}

	public void setUsers(Set<User> users) {
		this.users = users;
	}

}